package pkg_member

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ActivateRouter struct {
}

// InitActivateRouter 初始化 活动管理/发布 路由信息
func (s *ActivateRouter) InitActivateRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	activateRouter := Router.Group("activate").Use(middleware.OperationRecord())
	activateRouterWithoutRecord := Router.Group("activate")
	activateRouterWithoutAuth := PublicRouter.Group("activate")

	var activateApi = v1.ApiGroupApp.Pkg_memberApiGroup.ActivateApi
	{
		activateRouter.POST("createActivate", activateApi.CreateActivate)   // 新建活动管理/发布
		activateRouter.DELETE("deleteActivate", activateApi.DeleteActivate) // 删除活动管理/发布
		activateRouter.DELETE("deleteActivateByIds", activateApi.DeleteActivateByIds) // 批量删除活动管理/发布
		activateRouter.PUT("updateActivate", activateApi.UpdateActivate)    // 更新活动管理/发布
	}
	{
		activateRouterWithoutRecord.GET("findActivate", activateApi.FindActivate)        // 根据ID获取活动管理/发布
		activateRouterWithoutRecord.GET("getActivateList", activateApi.GetActivateList)  // 获取活动管理/发布列表
	}
	{
	    activateRouterWithoutAuth.GET("getActivatePublic", activateApi.GetActivatePublic)  // 获取活动管理/发布列表
	}
}
